package db;

import android.database.CursorWrapper;
import db.StuInfo.StuTable;

import com.usts236.exam5.Student;

import java.util.UUID;

public class Cursor extends CursorWrapper {
    /**
     * Creates a cursor wrapper.
     *
     * @param cursor The underlying cursor to wrap.
     */
    public Cursor(android.database.Cursor cursor) {
        super(cursor);
    }


    public Student getStudent() {
        //String uuidString = getString(getColumnIndex(StuTable.Cols.UUID));
        String snumb = getString(getColumnIndex(StuTable.Cols.SNUMB));
        String sname = getString(getColumnIndex(StuTable.Cols.SNAME));
        String stel = getString(getColumnIndex(StuTable.Cols.STEL));

        //Student student = new Student(UUID.fromString(uuidString));
        Student student= new Student(snumb,sname,stel);
//        student.setSno(snumb);
//        student.setSname(sname);
//        student.setStele(stel);

        return student;
    }
}
